Xbasic

Date_LastDayOfPreviousMonth Function

Syntax

LastDate as D = date_LastDayOfPreviousMonth([D date ])

Arguments

LastDate

The last date of the previous month.

date

Optional. Default = today. The date to use when calculating the last day of the previous month.

Description

The Date_LastDayOfPreviousMonth() function returns the last day of the previous month for a given date. If no argument is supplied, returns last day of the previous month for the current date.

Example

? Date_LastDayOfPreviousMonth()
= {05/31/2006}
? Date_LastDayOfPreviousMonth({7/4/06})
= {06/30/2006}

See Also